package com.example.demo.order.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;

/**
 * @ClassName OrderCreateRequest
 * @Description
 * @Author MingChang.Wei
 * @Date 2025/8/8
 **/
@Data
@Schema(description = "创建订单请求参数")
public class OrderCreateRequest {

    @NotBlank(message = "用户名不能为空")
    @Schema(description = "用户名", example = "admin")
    private String username;

    @NotNull(message = "商品ID不能为空")
    @Schema(description = "商品ID", example = "2001")
    private Long productId;

    @Min(value = 1, message = "购买数量不能小于1")
    @Schema(description = "购买数量", example = "2")
    private Integer quantity;
}
